Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Respect rewards parameter in getBlock transaction-level rewards #27655

Merged
merged 2 commits into from
Sep 8, 2022

Conversation

CriesofCarrots
Copy link
Contributor

Problem

The getBlock parameter rewards currently only affects whether block-level rewards are returned. Transaction-level rewards are returned regardless. While this isn't super critical with very few Rent payment, current behavior is a bit counterintuitive and may force clients to consume more data than they want to.

Summary of Changes

Pass show_rewards into UiTransactionStatusMeta constructors and only populate rewards when true.
Also fixup docs to be correct

@CriesofCarrots CriesofCarrots merged commit 5428495 into solana-labs:master Sep 8, 2022
mergify bot pushed a commit that referenced this pull request Sep 8, 2022
* Respect options.show_rewards in UiTransactionStatusMeta

* Fixup docs

(cherry picked from commit 5428495)
mergify bot pushed a commit that referenced this pull request Sep 8, 2022
* Respect options.show_rewards in UiTransactionStatusMeta

* Fixup docs

(cherry picked from commit 5428495)
mergify bot added a commit that referenced this pull request Sep 8, 2022
…port #27655) (#27669)

Respect rewards parameter in getBlock transaction-level rewards (#27655)

* Respect options.show_rewards in UiTransactionStatusMeta

* Fixup docs

(cherry picked from commit 5428495)

Co-authored-by: Tyera Eulberg <[email protected]>
mergify bot added a commit that referenced this pull request Sep 8, 2022
…port #27655) (#27670)

Respect rewards parameter in getBlock transaction-level rewards (#27655)

* Respect options.show_rewards in UiTransactionStatusMeta

* Fixup docs

(cherry picked from commit 5428495)

Co-authored-by: Tyera Eulberg <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants